package br.com.news.database.services;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import br.com.news.database.daos.interfaces.ICategoriaDao;
import br.com.news.database.entities.CategoriaEntity;
import br.com.news.database.utils.GenericService;
import br.com.news.database.utils.interfaces.IGenericDao;
import br.com.news.utils.database.beans.CategoriaBean;
import br.com.news.utils.database.interfaces.ICategoriaService;

@Named
public class CategoriaService extends GenericService<CategoriaBean, CategoriaEntity, Long> implements ICategoriaService{

	@Inject
	private ICategoriaDao cateforiaDao;

	@Override
	protected IGenericDao<CategoriaEntity, Long> getConcreteDao() {
		return this.cateforiaDao;
	}

	@Override
	public List<CategoriaBean> findCategoriaByUsuarioName(String login) {
		return parserEntity(this.cateforiaDao.findCategoriaByUsuarioName(login));
	}

}
